New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

redux-delayed-dispatch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-delayed-dispatch

Delayed Dispatch is setTimeout/clearTimeout but in middleware form with some small enhancements.

  • 1.0.0-2
  • alpha
  • npm
  • Socket score

Version published
Weekly downloads
32
decreased by-58.97%
Maintainers
1
Weekly downloads
 
Created
Source

Redux Delayed Dispatch

Delayed Dispatch is setTimeout/clearTimeout but in middleware form with some small enhancements.

Install and setup

  1. npm install redux-delayed-dispatch
  2. Add the store enhancer using applyMiddleware:

Example:

// import middleware
import delayedDispatch from 'redux-delayed-dispatch';

// use middleware in your store
createStore( reducer, applyMiddleware( delayedDispatch ) );

Using

For basic actions where the keys and values of the redux action or primitives (excluding object, array, and function )

import { delayAction, cancelAction } from 'redux-delayed-dispatch';

const myAction = ( param ) => ( { type: 'ACTION_TYPE', param } );

// delays myAction for 100 ms
const { id, cancel } = dispatch( delayAction( myAction, 100 ) );
if ( shouldCancelTimer ) {
	// myAction will not be dispatched
	dispatch( cancel );
}

FAQs

Package last updated on 22 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc